Platform Mocking | 您所在的位置:网站首页 › linux kernel api reference › Platform Mocking |
API露
struct device_node *of_fake_node(struct test *test, const char *name)露
Parameters struct test *testthe test to associate node with const char *namename of the node Description The struct device_node returned is allocated as a root node with the given name and otherwise behaves as a real struct device_node. Return the faked struct device_node struct platform_device *of_fake_probe_platform(struct test *test, struct platform_driver *driver, const char *node_name)露Parameters struct test *testthe test to associate the fake platform device with struct platform_driver *driverdriver to probe const char *node_namename of the device node created Description Creates a struct platform_device and an associated struct device_node, probes the provided struct platform_driver with the struct platform_device. Return the struct platform_device that was created struct platform_device *of_fake_probe_platform_by_name(struct test *test, const char *driver_name, const char *node_name)露Parameters struct test *testthe test to associate the fake platform device with const char *driver_namename of the driver to probe const char *node_namename of the device node created Description Same as of_fake_probe_platform() but looks up the struct platform_driver by the provided name. Return the struct platform_device that was created |
CopyRight 2018-2019 实验室设备网 版权所有 |